package com.choosefine.it.basedata.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 工种大类模型
 * @author guwenwei
 * @date   2016/11/26
 */
@ApiModel(value = "工种大类", description = "工种大类基础数据模型")
public class WorkTypeClass implements Serializable {
	@ApiModelProperty(value = "主键ID", required = true)
    private Integer id;
	@ApiModelProperty(value = "工种名", required = true)
    private String classname;
	@ApiModelProperty(value="创建时间")
    private Long ctime;
	@ApiModelProperty(value="修改时间")
	@JsonIgnore
	private Long utime;
	@ApiModelProperty(value="是否存在0带表存在,1代表不存在")
	private Integer isValid;
    private static final long serialVersionUID = 1L;

    /*
     * 用于链表排序
     * add by juchengyang 2017/2/16
     */
    @JsonIgnore
    private Integer sortNum;
    
    public Integer getIsValid() {
		return isValid;
	}

	public void setIsValid(Integer isValid) {
		this.isValid = isValid;
	}

	public Long getUtime() {
		return utime;
	}

	public void setUtime(Long utime) {
		this.utime = utime;
	}

	public Long getCtime() {
		return ctime;
	}

	public void setCtime(Long ctime) {
		this.ctime = ctime;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname == null ? null : classname.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorkTypeClass other = (WorkTypeClass) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getClassname() == null ? other.getClassname() == null : this.getClassname().equals(other.getClassname()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getClassname() == null) ? 0 : getClassname().hashCode());
        return result;
    }

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}
    
}